<template>
  <div>
    <TypeNav />
    <List />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="floor in floorList" :key="floor.id" :floor="floor" />
    <Brand />
  </div>
</template>

<script>
  import { reqFloorList } from "@/api";

  // import TypeNav from "./components/TypeNav";
  import List from "./components/List";
  import Recommend from "./components/Recommend";
  import Rank from "./components/Rank";
  import Like from "./components/Like";
  import Floor from "./components/Floor";
  import Brand from "./components/Brand";

  export default {
    name: "Home",
    components: {
      // TypeNav,
      List,
      Recommend,
      Rank,
      Like,
      Floor,
      Brand,
    },
    data() {
      return {
        floorList: [],
      };
    },
    mounted() {
      this.getFloorList();
    },
    methods: {
      async getFloorList() {
        let res = await reqFloorList();
        this.floorList = res;
      },
    },
  };
</script>

<style scoped lang="less"></style>
